<meta charset="utf-8">
<div class="box box-primary" id="cloudMember_addzzz" style="max-width: 1200px;min-height: 600px; padding: 50px;">
	<form role="form"  id="editForm" class="form-horizontal" >
			 
			
			 <div class="row form-group">
                <div class="col-md-2">
	                <div id="uploader-demo" class="form-group">
	                
					    <div id="fileList" class="uploader-list"></div>
					    <div id="filePickerz">选择图片</div>
					</div>
               </div>
                <div class="col-md-10" style="overflow: scroll;">
	              <img alt="" src=""  id="metLogo">
               </div>
               </div>
               
		
		<div class="box-footer">
			<button type="button" class="btn btn-default" onClick="layer.close(layer.index);">关闭</button>
		</div>
	</form>
	<script type="text/javascript">

        var uploaderz ;
        $(function(){
        	var contentType=zfesLayerEditDg.getLayerParam().contentType;
        	var stc=showImg(contentType);
        	$("#metLogo").attr("src",stc);
        	uploaderz = WebUploader.create({
                auto: true,
                swf:   '/static/lib/webuploader/Uploader.swf',
                server: '/met/service/tenant/upload/uploadCmsImg',
                pick: '#filePickerz',
                formData :{"contentType":contentType},
                accept: {
                    title: 'Images',
                    extensions: 'gif,jpg,jpeg,bmp,png',
                    mimeTypes: 'image/*'
                }
            }).on( 'uploadSuccess', function( data , response) {
                $("#metLogo").attr("src","/"+response.data.fileUrl+"?"+ Math.floor(Math.random()*100)).fadeIn();;
            }).on( 'uploadError', function( file , response) {
                alertSwal.warningText(response.data.message);
            });
        });

        function showImg(contentType){
        	switch (contentType) {
        	case 1:
        		return "/img/sitz/logo.png";
        	case 2:
        		return "/img/sitz/slideshow1.jpg";
        	case 3:
        		return "/img/sitz/slideshow2.jpg";
        	case 4:
        		return "/img/sitz/weichat.png";
        	case 5:
        		return "/img/sitz/wapsite.png";
        	case 6:
        		return "/img/sitz/plant1.jpg";
        	case 7:
        		return "/img/sitz/plant2.jpg";
        	case 8:
        		return "/img/sitz/plant3.jpg";
        	case 9:
        		return "/img/sitz/info_index.jpg";
        	default:
        		return "";
        	}
        }   
     
	</script>
</div>
